import 'package:mobile_app.core/core/domain/entities/premium_access_status.dart';

abstract class GetFirstlyTrainedLexicalItemDailyLimit {
  int? call({
    required PremiumAccessStatus premiumAccessStatus,
  });
}

class GetFirstlyTrainedLexicalItemDailyLimitImpl implements GetFirstlyTrainedLexicalItemDailyLimit {
  const GetFirstlyTrainedLexicalItemDailyLimitImpl();

  @override
  int? call({
    required PremiumAccessStatus premiumAccessStatus,
  }) {
    if (premiumAccessStatus.hasFullAccess) {
      return null;
    }

    if (premiumAccessStatus.isDemo || premiumAccessStatus.isIntro) {
      return 12;
    }

    if (premiumAccessStatus.isInactive) {
      return 10;
    }

    throw UnimplementedError();
  }
}
